package com.graduate.daydayup.room

import androidx.room.*

@Dao
interface NoteContentDao {
    //如果是查询
    @Query("SELECT * FROM  NoteContent ")
    fun getAllNotes(): MutableList<NoteContent>?

    @Query("DELETE FROM NoteContent ")
    fun deleteAllNotes()

    @Query("SELECT * FROM NoteContent WHERE id= :id")
    fun getAllById( id:Int?):NoteContent


    @Query("DELETE FROM NoteContent WHERE id= :id")
    fun deleteAllById( id:Int?)

    @Insert
    fun addNoteContent(noteContent:NoteContent)

    @Update
    fun updateNoteContent(noteContent :NoteContent)

    @Delete
    fun deleteByNoteContent(noteContent :NoteContent)
}